# coding: utf-8
import xadmin

from .models import treeHoleClass, agreeName, treeHole, topicofc, secret, agree, comment, reporTreason, reportAlready, imgs


class treeHoleClassAdmin(object):
    list_display = ['title', 'show', 'time']
    search_fields = ['title', 'show', 'time']
    list_filter = ['title', 'show', 'time']


class agreeNameAdmin(object):
    list_display = ['name', 'time']
    search_fields = ['name', 'time']
    list_filter = ['name', 'time']


class treeHoleAdmin(object):
    list_display = ['id', 'title', 'treeholeclass', 'agreeName', 'ask', 'text', 'input', 'show']
    search_fields = ['id', 'title', 'treeholeclass', 'agreeName', 'ask', 'text', 'input', 'show']
    list_filter = ['id', 'title', 'treeholeclass', 'agreeName', 'ask', 'text', 'input', 'show']


class topicofcAdmin(object):
    list_display = ['treeHole', 'content', 'show', 'time']
    search_fields = ['treeHole', 'content', 'show', 'time']
    list_filter = ['treeHole', 'content', 'show', 'time']


class secretAdmin(object):
    list_display = ['treeHole', 'onceName', 'topicofc', 'title', 'content', 'Interaction', 'show']
    search_fields = ['treeHole', 'onceName', 'topicofc', 'title', 'content', 'Interaction', 'show']
    list_filter = ['treeHole', 'onceName', 'topicofc', 'title', 'content', 'Interaction', 'show']


class agreeAdmin(object):
    list_display = ['id', 'user', 'secret', 'show', 'time']
    search_fields = ['id', 'user', 'secret', 'show', 'time']
    list_filter = ['id', 'user', 'secret', 'show', 'time']


class imgsAdmin(object):
    list_display = ['id', 'secret', 'img', 'show', 'time']
    search_fields = ['id', 'secret', 'img', 'show', 'time']
    list_filter = ['id', 'secret', 'img', 'show', 'time']


class commentAdmin(object):
    list_display = ['id', 'secret', 'onceName', 'SuperiorComment', 'content', 'show', 'time']
    search_fields = ['id', 'secret', 'onceName', 'SuperiorComment', 'content', 'show', 'time']
    list_filter = ['id', 'secret', 'onceName', 'SuperiorComment', 'content', 'show', 'time']


class reporTreasonAdmin(object):
    list_display = ['id', 'content', 'show', 'time']
    search_fields = ['id', 'content', 'show', 'time']
    list_filter = ['id', 'content', 'show', 'time']


class reportAlreadyAdmin(object):
    list_display = ['id', 'reporTreason', 'user', 'secret', 'comment', 'show', 'time']
    search_fields = ['id', 'reporTreason', 'user', 'secret', 'comment', 'show', 'time']
    list_filter = ['id', 'reporTreason', 'user', 'secret', 'comment', 'show', 'time']



xadmin.site.register(treeHoleClass, treeHoleClassAdmin)
xadmin.site.register(agreeName, agreeNameAdmin)
xadmin.site.register(treeHole, treeHoleAdmin)
xadmin.site.register(topicofc, topicofcAdmin)
xadmin.site.register(imgs, imgsAdmin)
xadmin.site.register(secret, secretAdmin)
xadmin.site.register(agree, agreeAdmin)
xadmin.site.register(comment, commentAdmin)
xadmin.site.register(reporTreason, reporTreasonAdmin)
xadmin.site.register(reportAlready, reportAlreadyAdmin)
